<!DOCTYPE html>
            
<HTML>
<HEAD>
<meta name="booktitle" content="Developing Applications With Objective Caml" >
 <meta charset="ISO-8859-1"><meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
<META name="GENERATOR" content="hevea 1.05-7 of 2000-02-24">
<META NAME="Author" CONTENT="Christian.Queinnec@lip6.fr">
<LINK rel=stylesheet type="text/css" href="videoc-ocda.css">
<script language="JavaScript" src="videoc.js"><!--
//--></script>
<TITLE>
 Introduction
</TITLE>
</HEAD>
<BODY class="regularBody">
<A HREF="book-ora054.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A>
<A HREF="book-ora057.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H2> Introduction</H2>
The reason to prefer one programming language over 
another lies in the ease of developing and maintaining robust
applications. Therefore, we conclude the first part of this book, 
which dealt with a general presentation of the Objective CAML language, 
by demonstrating its use in a number of applications.<BR>
<BR>
The first application implements a few functions which are used to
write database queries. We emphasize the use of list manipulations and
the functional programming style. The user has access to a set of
functions with which it is easy to write and run queries using
the Objective CAML language directly. This application shows the programmer
how he can easily provide the user with most of the query tools that
the user should need.<BR>
<BR>
The second application is an interpreter for a tiny
BASIC<A NAME="text15" HREF="book-ora060.html#note15"><SUP><FONT SIZE=2>1</FONT></SUP></A>. This kind of imperative language fueled the
success of the first microcomputers. Twenty years later, they seem
to be very easy to design. Although BASIC is an imperative language,
the implementation of the interpreter uses the functional features of
Objective CAML, especially for the evaluation of
commands. Nevertheless, the lexer and parser for the language use a
mutable structure.<BR>
<BR>
The third application is a one-player game, Minesweeper, which is fairly
well-known since it is bundled with the standard installation of
Windows systems. The goal of the game is to uncover a bunch of hidden
mines by repeatedly uncovering a square, which then indicates the
number of mines around itself. The implementation uses the
imperative features of the language, since the data structure used is
a two-dimensional array which is modified after each turn of the game.
This application uses the <TT>Graphics</TT> module to draw the game
board and to interact with the player. However, the automatic
uncovering of some squares will be written in a more functional
style.<BR>This latter application uses functions from the <TT>Graphics</TT>
module described in chapter <A HREF="index.html#chap-PG">5</A> (see page <A HREF="index.html#chap-PG">??</A>)
as well as some functions from the <TT>Random</TT> and <TT>Sys</TT>
modules (see chapter <A HREF="index.html#chap-Bibliotheques">8</A>, pages
<A HREF="book-ora076.html#sec-mod-random">??</A> and <A HREF="book-ora076.html#sec-mod-sys">??</A>).<BR>
<BR>
<HR>
<A HREF="book-ora054.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="index.html"><IMG SRC ="contents_motif.gif" ALT="Contents"></A>
<A HREF="book-ora057.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
